/*
 * framelimiter.h
 *
 *  Created on: 30-Apr-2009, 10-May-2009
 *      Author: catchthealien
 */

#ifndef FRAMELIMITER_H_
#define FRAMELIMITER_H_


namespace cta {

class framelimiter {
private:
	int MaxFrameRate;
	unsigned int StartTime;
	unsigned int WaitTime;
public:
	framelimiter();
	framelimiter(int framerate);

	bool Init();
	bool Init(int framerate);
	bool elapsed();

	virtual ~framelimiter();

    int getMaxFrameRate() const
    {
        return MaxFrameRate;
    }

    void setMaxFrameRate(int MaxFrameRate)
    {
        this->MaxFrameRate = MaxFrameRate;
    }

};

}

#endif /* FRAMELIMITER_H_ */
